let mongoose = require("mongoose");
mongoose.connect("mongodb://localhost/diary");
mongoose.connection.once("open", () => {
  console.log('mongodb://localhost/diary数据库链接成功')
})
mongoose.connection.on("err", () => {
  console.log('mongodb://localhost/diary数据库链接失败')
})
module.exports = mongoose